/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gui;

import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

class TransparentButton extends JLabel {

        private float fl;

	public TransparentButton(float f) {
            fl = f;
	    //super(text);
	    setOpaque(false);
	}

    @Override
	public void paint(Graphics g) {
	    Graphics2D g2 = (Graphics2D) g.create();
	    g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, fl));
	    super.paint(g2);
	    g2.dispose();
	}
}